package com.zyw.zhuangdian.property;


import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@NoArgsConstructor
@Component
@ConfigurationProperties(prefix = "zhuangdian",ignoreUnknownFields = false)
public class MyProperties {

    // 一天 ms
    private int jwtExpTime = 60*60*24*1000;

    // 5 分钟
    private long verifyCodeExpTimeMin = 5;

    private String tokenPrefix = "zhuangdian ";

    private String cacheVerifyCodePrefix="VERIFY_CODE-";

    private String cacheTokenPrefix="TOKEN-";

    private String cacheAdminPrefix="ADMIN-";

    private String upload_file_location = "uploads";

    public long getCacheJwtExpTime(){
        return jwtExpTime/60000;
    }
}
